#ifndef TASKMANAGER_H
#define TASKMANAGER_H

#include <mutex>

#include "nodetypes.h"

class TaskManager
{
public:
    explicit TaskManager(bool shuffle, int jobs = 1);
    ~TaskManager();

    void set_task_list(NodeTaskInfoList task_info_list);

    static void execute(const NodeTaskInfoList &task_info_list);
    static void execute_n(const NodeTaskInfoList &task_info_list,
                          int n);

    void run();
    void run(int n);

private:
    int __job_count;
    NodeTaskInfoList *__core_jobs;
    bool __shuffle;
};

#endif // TASKMANAGER_H
